import request from '@/config/axios'

export interface CreatorVO {
  id: number
  mobile: string
  outAccountName: string
  fansNum: number
  homeScreenshot: string
  deputyWorks: string
  status: number
  userid: number
}

// 查询创作者个人信息列表
export const getCreatorPage = async (params) => {
  return await request.get({ url: `/gcxq/creator/page`, params })
}

// 查询创作者个人信息详情
export const getCreator = async (id: number) => {
  return await request.get({ url: `/gcxq/creator/get?id=` + id })
}

// 新增创作者个人信息
export const createCreator = async (data: CreatorVO) => {
  return await request.post({ url: `/gcxq/creator/create`, data })
}

// 修改创作者个人信息
export const updateCreator = async (data: CreatorVO) => {
  return await request.put({ url: `/gcxq/creator/update`, data })
}

// 删除创作者个人信息
export const deleteCreator = async (id: number) => {
  return await request.delete({ url: `/gcxq/creator/delete?id=` + id })
}

// 导出创作者个人信息 Excel
export const exportCreator = async (params) => {
  return await request.download({ url: `/gcxq/creator/export-excel`, params })
}
